package com.huluobo.a2110mvvmjetpackdemo2.databinding;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;

import com.huluobo.a2110mvvmjetpackdemo2.R;
import com.huluobo.a2110mvvmjetpackdemo2.viewbinding.BaseActivity;

public class UserActivity extends BaseActivity<ActivityUserBinding> {

    @Override
    protected void initData() {

    }

    @Override
    protected void initView() {
        viewBinding.btnUserConfirm.setOnClickListener(v -> {
            User user = new User(viewBinding.edUserId.getText().toString(),
                    viewBinding.edUserName.getText().toString());
//            viewBinding.tvUserId.setText(user.getUserId());
//            viewBinding.tvUserName.setText(user.getUserName());
            viewBinding.setUser(user);
        });
    }

    @Override
    protected ActivityUserBinding getViewBinding() {
        return ActivityUserBinding.inflate(getLayoutInflater());
    }
}